package java2_unit3_1013.pet;

public class Cat extends Pet {
	
	private int lazy;

	protected int getLazy() {
		return lazy;
	}

	protected void setLazy(int lazy) {
		if(lazy<1 || lazy>10) {
			lazy=5;
		}
		this.lazy = lazy;
	}
	
	public Cat(String name,int health,String sex,int lazy) {
		super(name, health, sex);//调用了父类的有参构造方法---显示调用
		this.lazy=lazy;//给当前cat独有的属性赋值
	}
	public Cat () {
		//隐式调用父类的无参构造方法
		System.out.println("一只可爱的猫产生了！");
	}
	public void show() {
		System.out.println("宠物猫的自白：\n"+"昵称："+getName()+"，性别："+getSex()+"，健康值："+getHealth()+"懒度："+getLazy());

	}
	
}
